package site.jlopen.kuscia.errorcode;

public enum NodeRouteErrorCode implements ErrorCode {
    /**
     * route exist error
     */
    NODE_ROUTE_ALREADY_EXISTS(202012901),
    /**
     * route create error
     */
    NODE_ROUTE_CREATE_ERROR(202012902),
    /**
     * route does not exist
     */
    NODE_ROUTE_NOT_EXIST_ERROR(202012903),
    /**
     * route delete error
     */
    NODE_ROUTE_DELETE_ERROR(202012904),
    /**
     * route update error
     */
    NODE_ROUTE_UPDATE_ERROR(202012905),
    /**
     * route config error
     */
    NODE_ROUTE_CONFIG_ERROR(202012906);

    private final int code;

    NodeRouteErrorCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessageKey() {
        return "nodeRoute." + this.name();
    }

    @Override
    public Integer getCode() {
        return code;
    }
}